from django.urls import re_path
from .views import manager
from .views import customer
from django.urls import path

urlpatterns = [
    # 管理员模块
    re_path(r'^register/$', manager.register,name='register'),
    re_path(r'^login/sms/$', manager.login_sms,name='login_sms'),
    re_path(r'^send/sms/$',manager.send_sms,name='send_sms'),
    re_path(r'^login/$',manager.login,name='login'),
    re_path(r'^image/code/$',manager.image_code,name='image_code'),
    re_path(r'^logout/$', manager.logout,name='logout'),
    re_path(r'^$', manager.order_manage, name='order_manage'),
    re_path(r'^reset/$',manager.reset,name='reset'),

    # 订单管理
    re_path(r'^order/manage/$',manager.order_manage,name='order_manage'),
    re_path(r'^order/add/$',manager.order_add,name='order_add'),
    re_path(r'^order/block/$',manager.order_block,name='order_block'),
    re_path(r'^block/add/$',manager.block_add,name='block_add'),
    path('order/<int:nid>/edit/',manager.order_edit,name='order_edit'),
    path('order/<int:nid>/delete/',manager.order_delete,name='order_delete'),
    re_path(r'^order/blockinfo/$',manager.order_blockinfo,name='order_blockinfo'),
    re_path(r'^image/photo/$', manager.image_photo, name='image_photo'),
    re_path(r'^echarts/$',manager.echarts,name='echarts'),
    re_path(r'^pie/$',manager.pie,name='pie'),
    re_path(r'^pillar/$',manager.pillar, name='pillar'),
    re_path(r'^default/$',manager.default,name='default'),

    # 客户模块
    re_path(r'^user/login/$', customer.user_login, name='user_login'),
    re_path(r'^user/info/$',customer.userinfo,name='user_info'),
    re_path(r'^user/blockinfo/$',customer.user_blockinfo,name='user_blockinfo'),
    re_path(r'^user/reset/$',customer.user_reset,name='user_reset'),
    re_path(r'^user/register/$',customer.user_register,name='user_register'),
    re_path(r'^user/logout/$', customer.user_logout, name='user_logout'),
]